home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
001-025
/
scopedisk1
/
color_twiddler
/
colour.doc
< prev
next >
Wrap
Text File
|
1995-03-18
|
5KB
|
117 lines
/*------------------------------------------------------------------------*/
Colour - make a screen any colour you like, and load & save colour sets.
------
Copyright 1987, John Russell
5 Alderdice Place
St. John's, Newfoundland
Canada A1B 2P8
(709) 726-7847
UseNet: john13@garfield.uucp
john13@garfield.mun.cdn
Freely redistributable.
/*------------------------------------------------------------------------*/
This program has 4 uses:
First, you can experiment with different colour combinations by actually
specifying numeric parameters for Red, Green, and Blue. You can also do the
same with numerous programs which use "slider gadgets", but I include the
capability for completeness. Note there's also a slider-gadget option in
this program which you can enable at compile time.
Second, once you have found a colour combination you like, whether it's
on your Workbench screen, or on the screen of some other program, you
can save it to disk. The format of the saved file is very simple - for a
screen with N colours, there are N lines with 3 integer values each, for
Red, Green, and Blue which combine to any of the Amiga's 4096 possible
colours.
Third, you can instantly load this definition back in, and specify the
screen whose colours you want to change. You can thus have special colours
to use when running a word processor, terminal program, CLI session, etc.
I personally have about 5 sets of colours I use depending on my mood, if
my eyes are tired, if my monitor will be on for a long time and I want to
save a few phosphor molecules, etc.
Fourth, if you want to experiment with different colour combinations
interactively, you can bring up a colour window requestor on a specified
screen. This has the standard slider gadgets for adjusting colours and
also features like copy, undo, and range. The range option is the only
one that is not immediately obvious -- after selecting it, choose 2
colours in the palette and all colours in between will be changed to
a gradation somewhere between the two endpoints.
NB: This last option of the colour requestor may be omitted when the
program is compiled (this saves about 5K), since many other programs
are available that accomplish the same function. However I prefer to
leave it enabled since the code doesn't have to stay in memory at all
times as it does in most other similar utilities.
------
SYNTAX
------
To set one particular colour, on one particular screen -
colour set <screen> index red green blue
To load a group of colours -
colour load <screen> [from] <filename>
To save a group of colours -
colour save <screen> [to] <filename>
To adjust colours with the mouse -
colour adjust <screen>
If the screen has no title, you can specify "-null" in place of the title,
in which case the first screen with no title is used. Only the first word
of the title is considered, and case is not important. When loading a colour
file, the current directory is searched first and then the S: directory.
If the S: directory must be searched, the suffix ".col" is assumed to be
present; thus the following two forms are equivalent :
colour load workbench from black-and-white
colour load workbench from s:black-and-white.col
Examples -
colour set workbench 0 0 0 0 : sets Workbench background to black.
colour load vt100 from modem.col : set VT100 seperate screen colours.
colour save -null to dpaint.col : saves DPaint palette; screen has no title
colour load workbench wb.col : use the old Workbench colours
colour save mandelbrot mand.col : save a pretty-looking palette
colour adjust workbench : fairly powerful interactive control
------------
DISTRIBUTION
------------
This program is freely redistributable; no fees beyond reasonable charge
for media may be charged.
Source is included with this initial posting, along with an encoded
version of the executable. The source may be informative if you are
interested in how colours relate to the structure of the screen they affect.
If you pass this program on, please keep at least this documentation with
the executable. In the spirit of Canadian nationalism, I ask that you not
change the spelling of the excutable -- the "u" is supposed to be there.
A portion of the source is derived from a public domain colour
manipulation program. This section carries its own copyright notice and
distribution conditions, which are present in the file colorreq.c if you
have a copy of the source.
No donations are solicited; however if you send me a disk with public
domain software that you find useful (and possibly hasn't received wide
distribution), I'll do the same from this end with some lesser-known programs
that I use a lot.
John